#ifndef LIB_GEOUTILS_SERIALIZE_H
#define LIB_GEOUTILS_SERIALIZE_H
#include "libGeoutils/export.h"
#include <string>

namespace geo {
namespace io {
class GEOUTILS_EXPORT IOBase
{
public:
	IOBase();
	virtual ~IOBase();

	bool toTextFile(const std::string& op_path) const;
	bool fromTextFile(const std::string& op_path) const;
	bool toJsonFile(const std::string& op_path) const;
	bool fromJsonFile(const std::string& op_path);
	std::string getLastErrorMessage() const;

	virtual bool to_string(std::string& out_str) const;
	virtual bool from_string(const std::string& in_str);

	virtual bool to_json(std::string& out_str) const;
	virtual bool from_json(const std::string& in_str);

protected:
	mutable std::string mLastErrorMessage;

private:

};

} // namespace io
} // namespace geo

#endif // !LIB_GEOUTILS_SERIALIZE_H
